package com.loveyukari.websocket;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.web.socket.TextMessage;
import org.springframework.web.socket.WebSocketSession;
import org.springframework.web.socket.handler.TextWebSocketHandler;

import com.loveyukari.service.YukariWebSocketService;

/**
*
*yangshaohua
*2017年10月10日下午4:54:00
**/
@Component
public class YukariWebSocket extends TextWebSocketHandler{
	
	@Autowired
	private YukariWebSocketService yukariWebSocketService ;
	
	@Override
	public void handleTextMessage(WebSocketSession session, TextMessage message) throws Exception {
	}
	
	@Override
	public void afterConnectionEstablished(WebSocketSession session) throws Exception {
		yukariWebSocketService.openChatmsgWebSocket(session);
	}
	

}
